package cn.ccenjie.wsy.controller;

import cn.ccenjie.wsy.vo.Resp;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.RequestMapping;

public class JwtController {

    @RequestMapping("/token")
    public Resp login() {
        return Resp.ok().data("token", SecurityContextHolder.getContext().getAuthentication().getDetails().toString());
    }
}
